package com.bwie.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.pojo.Group;
import com.bwie.mapper.GroupMapper;
import com.bwie.service.GroupService;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author: 鑫仔
 * @Date: 2025/7/26 11:25
 * @Description:
 **/
@Transactional
@Service
public class GroupServiceImpl extends ServiceImpl<GroupMapper, Group> implements GroupService {

    @Autowired
    private GroupMapper groupMapper;

    @Override
    public R groupList(PageInfoVo pageInfoVo) {
        Page<Group> groupPage = new Page<>(pageInfoVo.getPageNum(), pageInfoVo.getPageSize());
        Page<Group> page = groupMapper.groupList(groupPage, pageInfoVo);
        return R.OK(page);
    }
}
